<?php
try {
	$invoice = Invoice::getInvoiceById($_GET['invoiceId']);
	$package = Package::getPackage($invoice['packageId'], true);
	$message = <<<HTML
		invoice id: {$invoice['id']}<br />
		type: {$package['type']}<br />
		package name: {$package['name']}<br />
		package info: {$package['info']}<br />
HTML;
	//ฝ่ายเทคนิคติดตั้งเสร็จแล้ว active invoice <a href="http://p2dc.com/old.php?page=system.activeInvoice&invoiceId={$_GET['invoiceId']}">คลิก</a>
	Notify::mail(Notify::EMAIL_ACCOUNTING, "P2DC Alert", $message);
	echo "ส่งอีเมลแจ้งกลับไปยังฝ่ายบัญชีแล้ว";
}
catch (Exception $ex) {
	Log::error($ex->getMessage());
	View::display('error', $ex->getMessage());
	throw $ex;
}